package com.itheima_7;

public class test_1 {
    public static void main(String[] args) {
    AA  a=new AA();
        a.methodA(new InterA() {
            @Override
            public void showA() {

            }
        });
        a.methodA(() -> {

        });
    }
}
//定义接口

class AA  {
    public void methodA(InterA a) {
        a.showA();
    }
}
interface InterA {
    void showA();
}